<template>
  <div>
    <DetailPage key="1" v-bind="detailConfig" :model="modelVal" style="width: 100%; margin: 0 auto">
    <template #handleStatus>
        <el-tag type="success">已处理</el-tag>
    </template>
    </DetailPage>
        <div style="margin-left: 20px;" v-if="!nowRowData.handleImgs">
          <p style="font-weight: 700;font-size: 16px;text-align: left;color: #0a2654;margin-bottom: 30px;">处理信息</p>
          <div>
            <el-tag type="danger">未处理</el-tag>
          </div>
        </div>
        <DetailPage v-else key="2" v-bind="otherDetailConfig" :model="modelVal" style="width: 100%; margin: -30px auto"></DetailPage>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, toRefs, onMounted} from 'vue'
import {detailConfig,otherDetailConfig} from './config'
import apiMod from '@/apiMod/index'
import DetailPage from '@/views/aplid/DetailPage/index.vue'

let props = defineProps({
    nowRowData:{
        type:Object,
        defalut:()=>({
            handleImgs:''
        })
        
    }
})
let modelVal = ref({})
const getInitData = () =>{
    apiMod.view_pbDispatch_view(props.nowRowData?.id).then(res=>{
        if(res.code==0){
            modelVal.value = res.data
            modelVal.value['handleStatus'] = '1'
            modelVal.value['handleStatusLabel'] = '已处理'
            modelVal.value['alarm_organizationName'] =  modelVal.value['pbAlarm'].organizationName
            modelVal.value['alarm_alarmTime'] =  modelVal.value['pbAlarm'].alarmTime
            modelVal.value['alarm_alarmReasonLabel'] =  modelVal.value['pbAlarm'].alarmReasonLabel
        }
    })
}
getInitData()

</script>
<style scoped lang="scss">
</style>